Assignment Five

A Useful Procedure
using a Loop and a Conditional

   STATMENT of Problem: Control who gets last BEERS

   If the number of beers in the refrigerator gets below a critical number 
the program will check to ensure that only Bruce can get more beer. Conditions: small door on the refrigerator allowing a maximum of two beers to be removed at a time.

Pseudocode

The Program will: count number of beers every time the refrigerator door closes if count less than minimum lock door while door locked request special code to release beer if code correct release beer else give large electric shock to deter further activity.
__________________________________________________________________________

Flowchart

Created Feb 20,2000 Last Update This page NOT copyrighted feel free to plagiarize

To Bruces Home page